package com.hn.framework.web.dao;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;

/**
 * 通用Mapper
 *
 * @author admin
 */
@RegisterMapper
public interface MyMapper<T>{

    /**
     * 批量逻辑删除
     *
     * @param ids ids
     * @return int
     */
    @DeleteProvider(type = MyProvider.class, method = "dynamicSQL")
    int deleteByIds(String ids);

    /**
     *  保存
     * @param record record
     * @return int
     */
    @InsertProvider(type = MyProvider.class, method = "dynamicSQL")
    int save(T record);

}
